var events = require("events");//原生模块
var Emitter = events.EventEmitter;
var eventObj = new Emitter();//事件对象实例化
events.on("say hello",function(){//事件的监听
    console.log("hello world");
})

setTimeout(()=>{
    eventObj.emit("say hello");//事件的触发
},3000)
